<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<title>MCU Manager</title>
	<%@ include file="/WEB-INF/jsp/common/cssjs2.jsp" %>
	
	<script type="text/javascript">
	<%@ include file="/javascript/app/conference.js" %>
	</script>
	
	<style type="text/css">
	    html, body,form {
	        width: 100%;
	        height: 100%;
	        margin: 0px;
	        overflow: hidden;
	    }
	</style>
</head>
<body>
<form id="id_form" method="post">
	<c:if test="${param.opt=='modify'}">
		<input type="hidden" value="PUT" name="_method"/>
	</c:if>
	
	<div id="id_list" class="popwindow">
		<ul class="win-list">
			<li><a href="#" class="menu-item" style="font-weight:bold;" onclick="showItem('id_general');"><fmt:message key='form.common.items.general'/></a></li>
			<li><a href="#" class="menu-item" onclick="showItem('id_auv');"><fmt:message key='form.common.items.audioVideo'/></a></li>
			<li><a href="#" class="menu-item" onclick="showItem('id_osd');"><fmt:message key='form.common.items.osd'/></a></li>
			<li><a href="#" class="menu-item" onclick="showItem('id_broadcast');"><fmt:message key='form.common.items.broadcast'/></a></li>
			<li><a href="#" class="menu-item" onclick="showItem('id_participant');"><fmt:message key='form.common.items.participants'/></a></li>
		</ul>
	</div>
	<div id="id_container_right" class="popwindow">
	<div id="id_general" style="display:none;" class="table-container">
		<div style="height:20px;"></div>
		<table>
			<tr>
				<td><fmt:message key='form.conference.useProfile'/></td>
				<td>
					<select id="id_profile" class="input-text">
						<option value=""></option>
					</select>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.conference.group'/></td>
				<td>
					<select id="id_group" name="group" class="input-text">
						<option value=""></option>
					</select>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.conference.number'/></td>
				<td><input id="id_number" type="text" <c:if test="${param.opt=='modify'}">readonly="readonly" style="background-color: #DEDBD6;"</c:if> name="number" value="${model.number}" class="input-text easyui-validatebox" validType="nodelimiter" required="true"></td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.confName'/></td>
				<td><input type="text" class="input-text easyui-validatebox" value="${model.name}" name="name" required="true"></td>
			</tr>
			<tr>
				<td><fmt:message key='form.conference.password'/></td>
				<td><input type="password" name="password" value="${model.password}" class="input-text"></td>
			</tr>
			<tr>
				<td><fmt:message key='form.conference.chairpassword'/></td>
				<td><input type="password" class="input-text" value="${model.chairpassword}" name="chairpassword"></td>
			</tr>
			<tr>
				<td><fmt:message key='form.conference.endTime'/></td>
				<td>
					<input type="checkbox" value="true" name="endLimit">
					<input id="id_endTime" type="text" readonly style="width:180px;" name="endTime" value="${model.endTime}">
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.bandwidth'/></td>
				<td>
					<select class="input-text" name="bandwidth">
						<option value="128">128</option>
                        <option value="192">192</option>
                        <option value="256">256</option>
                        <option value="320">320</option>
                        <option value="384">384</option>
                        <option value="448">448</option>
                        <option value="512">512</option>
                        <option value="576">576</option>
                        <option value="640">640</option>
                        <option value="768">768</option>
                        <option value="1024">1024</option>
                        <option value="1472">1472</option>
                        <option value="1920">1920</option>
						<option value="2048">2048</option>
						<option value="2560">2560</option>
						<option value="3072">3072</option>
						<option value="3584">3584</option>
						<option value="4096">4096</option>
					</select>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.maxAudioPorts'/></td>
				<td>
				<input type="text" class="easyui-validatebox" value="${model.maxAudioPorts}" name="maxAudioPorts">
				<input type="checkbox" value="true" name="reservedAudioPorts" >
				<fmt:message key='form.common.reserved'/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.maxVideoPorts'/></td>
				<td>
				<input type="text" class="easyui-validatebox" value="${model.maxVideoPorts}" name="maxVideoPorts">
				<input type="checkbox" value="true" name="reservedVideoPorts" >
				<fmt:message key='form.common.reserved'/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.callInType'/></td>
				<td>
				<input type="radio" value="all" name="callInType"><fmt:message key="form.common.callInType.all"/>
				<input type="radio" value="list" name="callInType"><fmt:message key="form.common.callInType.list"/>
				<input type="radio" value="registered" name="callInType"><fmt:message key="form.common.callInType.registered"/>
				<input type="radio" value="none" name="callInType"><fmt:message key="form.common.callInType.none"/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.encrypt'/></td>
				<td>
				<input type="radio" value="disable" name="encrypt"><fmt:message key="form.common.encrypt.disable"/>
				<input type="radio" value="enable" name="encrypt"><fmt:message key="form.common.encrypt.enable"/>
				<input type="radio" value="forced" name="encrypt"><fmt:message key="form.common.encrypt.forced"/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.description'/></td>
				<td><textarea rows="5" name="topic" class="input-text"><c:out value='${model.topic}'/></textarea></td>
			</tr>
		</table>
		<div style="height:20px;"></div>
	</div>
	<div id="id_auv" style="display:none;" class="table-container">
		<div style="height:20px;"></div>
		<table>
			<tr>
				<td><fmt:message key='form.common.muteOnJoin'/></td>
				<td>
				<input type="checkbox" value="true" name="muteOnJoin">
				<fmt:message key='form.common.enable'/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.audioFormats'/></td>
				<td>
					<input type="checkbox" value="g7221c" name="audioFormatsArray"/>G.722.1C
                    <input type="checkbox" value="g7221" name="audioFormatsArray"/>G.722.1
                    <input type="checkbox" value="g722" name="audioFormatsArray"/>G.722
                    <input type="checkbox" value="ilbc20" name="audioFormatsArray"/>iLBC-20<br/>
                    <input type="checkbox" value="ilbc30" name="audioFormatsArray"/>iLBC-30
                    <input type="checkbox" value="g729" name="audioFormatsArray"/>G.729
                    <input type="checkbox" value="mulaw" name="audioFormatsArray"/>G.711U
                    <input type="checkbox" value="alaw" name="audioFormatsArray"/>G.711A   
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.h263cif4Enabled'/></td>
				<td>
				<input type="checkbox" value="true" name="h263cif4Enabled" />
				<fmt:message key='form.common.enable'/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.h264Enabled'/></td>
				<td>
				<input type="checkbox" value="true" name="h264Enabled" />
				<fmt:message key='form.common.enable'/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.h264Definition'/></td>
				<td>
				<select name="h264Definition" class="input-text">
				<c:choose>
					<c:when test="${sessionScope.loginInfo.h264definition=='HD720P' }">
						<option value="CIF">CIF</option>
	                    <option value="CIF4">CIF4</option>
	                    <option value="HD720P">HD720P</option>
					</c:when>
					<c:when test="${sessionScope.loginInfo.h264definition=='HD1080P' }">
						<option value="CIF">CIF</option>
	                    <option value="CIF4">CIF4</option>
	                    <option value="HD720P">HD720P</option>
	                    <option value="HD1080P">HD1080P</option>
					</c:when>
					<c:otherwise>
						<option value="CIF">CIF</option>
						<option value="CIF4">CIF4</option>
					</c:otherwise>
				</c:choose>
				</select>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.h239Enabled'/></td>
				<td>
				<input type="checkbox" value="true" name="h239Enabled" >
				<fmt:message key='form.common.enable'/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.h239Bandwidth'/></td>
				<td>
				<select name="h239Bandwidth" class="input-text">
					<option value="96">96</option>
                    <option value="128">128</option>
                    <option value="192">192</option>
                    <option value="256">256</option>
                    <option value="320">320</option>
                    <option value="384">384</option>
					<option value="448">448</option>
                    <option value="512">512</option>
                    <option value="576">576</option>
                    <option value="640">640</option>
                    <option value="768">768</option>
                    <option value="1024">1024</option>
                    <option value="1472">1472</option>
                    <option value="1920">1920</option>
				</select>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.h239Codec'/></td>
				<td>
				<select name="h239Codec" class="input-text">
					<option value="H.263">H.263</option>
                    <option value="H.264">H.264</option>
				</select>
				</td>
			</tr>
		</table>
		<div style="height:20px;"></div>
	</div>
	<div id="id_osd" style="display:none;" class="table-container">
		<div style="height:20px;"></div>
		<table>
			<tr>
				<td><fmt:message key='form.common.textPosition'/></td>
				<td>
				<select name="textPosition" class="input-text">
					<option value="top_left"><fmt:message key="conf.font.position.topleft"/></option>
                    <option value="top_center"><fmt:message key="conf.font.position.topcenter"/></option>
                    <option value="top_right"><fmt:message key="conf.font.position.topright"/></option>
                    <option value="bottom_left"><fmt:message key="conf.font.position.bottomleft"/></option>
                    <option value="bottom_center"><fmt:message key="conf.font.position.bottomcenter"/></option>
                    <option value="bottom_right"><fmt:message key="conf.font.position.bottomright"/></option>
				</select>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.textFont'/></td>
				<td>
				<select name="textFont" class="input-text">
					<option value="big"><fmt:message key="conf.font.size.big"/></option>
                    <option value="middle"><fmt:message key="conf.font.size.middle"/></option>
                    <option value="small"><fmt:message key="conf.font.size.small"/></option>
				</select>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.textColor'/></td>
				<td>
				<input type="text" name="textColor" id="id_textColor" class="input-text"/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.textBgEnabled'/></td>
				<td>
				<input type="checkbox" name="textBgEnabled" value="true"/>
				<fmt:message key='form.common.enable'/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.textBgColor'/></td>
				<td>
				<input type="text" name="textBgColor" id="id_textBgColor" class="input-text"/>
				</td>
			</tr>
            <tr>
				<td><fmt:message key='form.common.textDisplayTime'/></td>
				<td>
				<input type="text" class="input-text" name="textDisplayTime" value="${model.textDisplayTime}"/>
				</td>
            </tr>
		</table>
		<div style="height:20px;"></div>
	</div>
	<div id="id_broadcast" style="display:none;" class="table-container">
		<div style="height:20px;"></div>
		<table>
			<tr>
				<td><fmt:message key='form.common.broadcastEnabled'/></td>
				<td>
				<input type="checkbox" name="broadcastEnabled" value="true"><fmt:message key='form.common.enable'/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.broadcastPassword'/></td>
				<td>
				<input type="password" class="input-text" name="broadcastPassword" value="${model.broadcastPassword}">
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.broadcastBandwidth'/></td>
				<td>
				<select name="broadcastBandwidth" class="input-text">
					<option value="128">128</option>
					<option value="192">192</option>
					<option value="256">256</option>
					<option value="320">320</option>
					<option value="384">384</option>
					<option value="448">448</option>
					<option value="512">512</option>					
				</select>
				</td>
			</tr>
			<tr>
				<td><fmt:message key='form.common.broadcastNumLimit'/></td>
				<td>
				<input type="text" class="input-text" name="broadcastNumLimit" value="${model.broadcastNumLimit}">
				</td>
			</tr>
		</table>
		<div style="height:20px;"></div>
	</div>
	<div id="id_participant" style="display:none;">
		<div style="font-size:12px;">
		<input type="hidden" name="participantsJSON">
		</div>
		<div id="id_participant_grid" style="width:100%;height:430px;"></div>
		<div id="id_participant_bar"></div>
	</div>
	</div>
	<div id="id_footer" align="right" style="padding:10px;">
        <input type="button" onclick="doSubmit();" class="mybtn" value="<fmt:message key='btn.ok'/>" >
		<button onclick="parent.closeWin();" class="mybtn"><fmt:message key='btn.cancel'/></button>
	</div>
	<div id="id_win_container" style="width:100%;height:100%"></div>
</form>

<div id="id_txt_cp" style="position:absolute;top:80px;left:80px;"></div>
<div id="id_bg_cp" style="position:absolute;top:100px;left:100px;"></div>
</body>
</html>